<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <title>天使健康</title>
    <%@ include file="/commons/static.jsp"%>
</head>
<body >




    <!-- 导航 -->
    <div class="navbar">
        <div class="navbar-inner">
            <div class="navbar-container">
                <!-- logo -->
                <div class="navbar-header pull-left">
                    <a href="#" class="navbar-brand">
                        <small>
                            <img src="${ctx}/dep/img/angel-logo.png"alt="" />
                        </small>
                    </a>
                </div>
                <!-- /logo -->

                <!-- 显示隐藏按钮 -->
                <div class="sidebar-collapse" id="sidebar-collapse">
                    <i class="collapse-icon fa fa-bars"></i>
                </div>
                <!-- /显示隐藏按钮 -->
                <!-- 提醒--->
                <div class="navbar-header pull-right">
                    <div class="navbar-account">
                        <ul class="account-area">
                            <li>
                                <a class=" dropdown-toggle" data-toggle="dropdown" title="Help" href="#">
                                    <i class="icon fa fa-warning"></i>
                                </a>
                                <!--Notification Dropdown-->
                                <ul class="pull-right dropdown-menu dropdown-arrow dropdown-notifications">
                                    <li>
                                        <a href="#">
                                            <div class="clearfix">
                                                <div class="notification-icon">
                                                    <i class="fa fa-gift bg-warning white"></i>
                                                </div>
                                                <div class="notification-body">
                                                    <span class="title">系统升级</span>
                                                    <span class="description">15:00 pm</span>
                                                </div>
                                                <div class="notification-extra">
                                                    <i class="fa fa-clock-o warning"></i>
                                                    <span class="warning">warning</span>
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                    <!-- <li>
                                        <a href="#">
                                            <div class="clearfix">
                                                <div class="notification-icon">
                                                    <i class="fa fa-check bg-darkorange white"></i>
                                                </div>
                                                <div class="notification-body">
                                                    <span class="title">Uncharted break</span>
                                                    <span class="description">03:30 pm - 05:15 pm</span>
                                                </div>
                                                <div class="notification-extra">
                                                    <i class="fa fa-clock-o darkorange"></i>
                                                </div>
                                            </div>
                                        </a>
                                    </li> -->
                                    <!-- <li>
                                        <a href="#">
                                            <div class="clearfix">
                                                <div class="notification-icon">
                                                    <i class="fa fa-gift bg-warning white"></i>
                                                </div>
                                                <div class="notification-body">
                                                    <span class="title">Kate birthday party</span>
                                                    <span class="description">08:30 pm</span>
                                                </div>
                                                <div class="notification-extra">
                                                    <i class="fa fa-calendar warning"></i>
                                                    <i class="fa fa-clock-o warning"></i>
                                                    <span class="description">at home</span>
                                                </div>
                                            </div>
                                        </a>
                                    </li> -->
                                    <!-- <li>
                                        <a href="#">
                                            <div class="clearfix">
                                                <div class="notification-icon">
                                                    <i class="fa fa-glass bg-success white"></i>
                                                </div>
                                                <div class="notification-body">
                                                    <span class="title">Dinner with friends</span>
                                                    <span class="description">10:30 pm</span>
                                                </div>
                                            </div>
                                        </a>
                                    </li> -->
                                    <!-- <li class="dropdown-footer ">
                                        <span>
                                            Today, March 28
                                        </span>
                                        <span class="pull-right">
                                            10°c
                                            <i class="wi wi-cloudy"></i>
                                        </span>
                                    </li> -->
                                </ul>
                                <!--/提醒-->
                            </li>
                            <li>
                                <a class="wave in dropdown-toggle animated bounce" data-toggle="dropdown" title="Help" href="#">
                                    <i class="icon fa fa-envelope"></i>
                                    <span class="badge ">3</span>
                                </a>
                                <!--Messages Dropdown-->
                                <ul class="pull-right dropdown-menu dropdown-arrow dropdown-messages">
                                    <li>
                                        <a href="#">
                                            <img src="${ctx}/dep/img/avatars/divyia.png" class="message-avatar" alt="Divyia Austin">
                                            <div  class="message">
                                                <span class="message-sender">
                                                    	来自张医师的私信
                                                </span>
                                                <span class="message-time">
                                                    2016-09-30
                                                </span>
                                                <span class="message-subject">
                                                    	心血管咨询
                                                </span>
                                                <span class="message-body">
                                                    	心血管咨询任务的结构分解
                                                </span>
                                            </div>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <img src="${ctx}/dep/img/avatars/bing.png" class="message-avatar" alt="Microsoft Bing">
                                            <div class="message">
                                                <span class="message-sender">
                                                    	系统消息
                                                </span>
                                                <span class="message-time">
                                                 	   昨天
                                                </span>
                                                <span class="message-subject">
                                                    	您有一个未完成的任务‏
                                                </span>
                                                <span class="message-body">
                                                   	 您有一个未完成的任务，详情请查看任务列表
                                                </span>
                                            </div>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <img src="${ctx}/dep/img/avatars/adam-jansen.png" class="message-avatar" alt="Divyia Austin">
                                            <div class="message">
                                                <span class="message-sender">
                                                    	客服私信
                                                </span>
                                                <span class="message-time">
                                                   	 回复：系统密码重置
                                                </span>
                                                <span class="message-subject">
                                                    	三天前
                                                </span>
                                                <span class="message-body">
                                                    	之前申请的密码重置已经成功了
                                                </span>
                                            </div>
                                        </a>
                                    </li>
                                </ul>
                                <!--/Messages Dropdown-->
                            </li>

                            <li>
                                <a class="dropdown-toggle" data-toggle="dropdown" title="Tasks" href="#">
                                    <i class="icon fa fa-tasks"></i>
                                    <span class="badge">4</span>
                                </a>
                                <!--Tasks Dropdown-->
                                <ul class="pull-right dropdown-menu dropdown-tasks dropdown-arrow ">
                                    <li class="dropdown-header bordered-darkorange">
                                        <i class="fa fa-tasks"></i>
                                        	当前任务数：4
                                    </li>
                                    <li>
                                        <a href="#">
                                            <div class="clearfix">
                                                <span class="pull-left">当天任务</span>
                                                <span class="pull-right">35</span>
                                            </div>

                                            <div class="progress progress-xs">
                                                <div style="width:35%" class="progress-bar"></div>
                                            </div>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <div class="clearfix">
                                                <span class="pull-left">最近三天任务</span>
                                                <span class="pull-right">65</span>
                                            </div>

                                            <div class="progress progress-xs">
                                                <div style="width:65%" class="progress-bar progress-bar-success"></div>
                                            </div>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <div class="clearfix">
                                                <span class="pull-left">已执行任务</span>
                                                <span class="pull-right">75</span>
                                            </div>

                                            <div class="progress progress-xs">
                                                <div style="width:75%" class="progress-bar progress-bar-darkorange"></div>
                                            </div>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <div class="clearfix">
                                                <span class="pull-left">已经完成任务</span>
                                                <span class="pull-right">10</span>
                                            </div>

                                            <div class="progress progress-xs">
                                                <div style="width:10%" class="progress-bar progress-bar-warning"></div>
                                            </div>
                                        </a>
                                    </li>
                                    <!-- <li class="dropdown-footer">
                                        <a href="#">
                                            See All Tasks
                                        </a>
                                        <button class="btn btn-xs btn-default shiny darkorange icon-only pull-right"><i class="fa fa-check"></i></button>
                                    </li> -->
                                </ul>
                                <!--/Tasks Dropdown-->
                            </li>
                            <li>
                                <a class="login-area dropdown-toggle" data-toggle="dropdown">
                                    <div class="avatar" title="View your public profile">
                                        <c:if test="${currentUser.photo != null && currentUser.photo != ''}"><img src="${tracker_server }${currentUser.photo }"></c:if>
                                        <c:if test="${currentUser.photo == null || currentUser.photo == ''}"><img src="${ctx }/home/common/img/avatars/Stephanie-Walter.jpg"></c:if>
                                    </div>
                                    <section>
                                        <h2 style="font-size:12px"><span class="profile"><span>${currentUser.name }</span></span></h2>
                                    </section>
                                </a>
                                <!--用户登录-->
                                <ul class="pull-right dropdown-menu dropdown-arrow dropdown-login-area">
                                    <li class="edit" style="text-align:center">
                                        <a href='javascript:void(0);' onclick=aa('sysUser/findUserInfo') >个人信息</a>
                                    </li>
                                     <li class="edit" style="text-align:center">
                                        <a href='javascript:void(0);' onclick=aa('sysUser/repassword')>修改密码</a>
                                    </li>
                                    <!--颜色-->
                                    <li class="theme-area">
                                        <ul class="colorpicker" id="skin-changer">
                                            <li><a class="colorpick-btn" href="#"  style="background-color:#5DB2FF;" rel="${ctx}/dep/moban/css/skins/blue.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#"  style="background-color:#2dc3e8;" rel="${ctx}/dep/moban/css/skins/azure.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#"  style="background-color:#03B3B2;" rel="${ctx}/dep/moban/css/skins/teal.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#"  style="background-color:#53a93f;" rel="${ctx}/dep/moban/css/skins/green.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#"  style="background-color:#FF8F32;" rel="${ctx}/dep/moban/css/skins/orange.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#"  style="background-color:#cc324b;" rel="${ctx}/dep/moban/css/skins/pink.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#"  style="background-color:#AC193D;" rel="${ctx}/dep/moban/css/skins/darkred.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#"  style="background-color:#8C0095;" rel="${ctx}/dep/moban/css/skins/purple.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#"  style="background-color:#0072C6;" rel="${ctx}/dep/moban/css/skins/darkblue.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#"  style="background-color:#585858;" rel="${ctx}/dep/moban/css/skins/gray.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#"  style="background-color:#474544;" rel="${ctx}/dep/moban/css/skins/black.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#"  style="background-color:#001940;" rel="${ctx}/dep/moban/css/skins/deepblue.min.css"></a></li>
                                        </ul>
                                    </li>
                                   
                                    <li class="dropdown-footer">
                                        <a href="${ctx}/sysUser/logout">
                                       		    退出登录
                                        </a>
                                    </li>
                                </ul>
                                <!--/用户登录-->
                            </li>
                            <!-- /Account Area -->
                            
                            <!-- 设置图标 -->
                        </ul>
                    </div>
                </div>
                <!-- /Account Area and Settings -->
            </div>
        </div>
    </div>
    <!-- /Navbar -->
    <!-- Main Container -->
    <div class="main-container container-fluid">
        <!-- Page Container -->
        <div class="page-container">
            <!-- Page Sidebar -->
            <div class="page-sidebar" id="sidebar">
           	 <img id="imgbg" src='${ctx }/images/load.gif' style='position: absolute;z-index:1;width:100%;top:30px;' />
                <!-- Page Sidebar Header-->
                <div class="sidebar-header-wrapper">
                  
                  <ul class="nav sidebar-menu"></ul>
                </div>
                <!-- /Page Sidebar Header -->
                <!-- Sidebar Menu -->
                
                <!-- /导航菜单 -->
            </div>
            <div class="row J_mainContent page-content" id="content-main">
            	<div class="wapper">
                <!-- /面包屑导航-->
                <!--头部按钮-->
                <div class="page-header position-relative">
                    <!--Header Buttons-->
                    <div class="header-buttons">
                        <a class="sidebar-toggler" href="#">
                            <i class="fa fa-arrows-h"></i>
                        </a>
                        <a class="refresh" id="refresh-toggler" href="">
                            <i class="glyphicon glyphicon-refresh"></i>
                        </a>
                        <a class="fullscreen" id="fullscreen-toggler" href="#">
                            <i class="glyphicon glyphicon-fullscreen"></i>
                        </a>
                    </div>
                    <!--头部按钮end-->
                </div>
            	</div>
               <iframe id="iframe0" class="J_iframe"    name="iframe0"   width="100%" height="100%" onload="this.height=getDocHeight()"
               		 frameborder="0" src="${ctx }/console/index" 

               		data-id="sysconfig/area_manager.html" seamless>
               </iframe>

           </div>
           
        </div>
       
    </div>





   <script type="text/javascript" src="${ctx}/dep/metisMenu/jquery.metisMenu.js"></script>
   <script type="text/javascript" src="${ctx}/dep/slimscroll/jquery.slimscroll.min.js"></script>
   <script type="text/javascript" src="${ctx}/dep/layer/layer.min.js"></script>
   <script type="text/javascript" src="${ctx}/dep/hplus.min.js"></script>
   <script type="text/javascript" src="${ctx}/dep/contabs.min.js"></script>
	
  
    <script>
    
    function getDocHeight() {

    }
    
    function changeColor(val){
    	$(".navbar-inner").css("color","#dd514c");
    }
    function loadConsole(){
    	$('.J_iframe').load(s);
    	//$('#loadConsole').load(s+"/console/index");
    }
	var s = '${ctx}';
		$(function(){
			
			 if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){  
			       $("#iframe0").css("height",document.documentElement.clientHeight);
			 }else{
				 $("#iframe0").css("height",document.body.scrollHeight);
			 } 
			
			var bg = getThemeColorFromCss('themeprimary');
			$(".navbar-inner").css("background",bg);
			loadConsole();
			$.ajax({
                url: "${ctx}/manag/menu/findAllMenu",
                type: "POST",
                dataType : "json",
        		success : function(data) {
        			$("#imgbg").remove();
        			$(".sidebar-menu").html("");
        			var obj = eval(data);
                $(".sidebar-menu").append('<li class="active"><a  href="${ctx }/sysUser/success"class="menu-dropdown"><i class="menu-icon glyphicon glyphicon-home"></i><span class="menu-text"> 控制台 </span></a></li>');
        			var i = 1;
    	     		//遍历菜单数组
    	     		for(var i = 0; i<obj.length; i++){
   	     				var id = obj[i]["id"];
   	     				var pid = obj[i]["pId"];
   	     				var pids = obj[i]["pIds"];
   	     				var name = obj[i]["name"];
   	     				var icon = obj[i]["file"];
   	     				var url = obj[i]["url"];
   	     				if(pids == '-1'){
   	     					if(id == 4)
   	     						var str = "<li ><a href='javascript:void(0);' onclick=aa('"+url+"') class='menu-dropdown'><i class='menu-icon fa "+icon+"'></i><span class='menu-text'>"+name+" </span> <i class='menu-expand'></i></a><ul class='submenu' id="+id+"></ul></li>";
   	     					else
   	     						var str = "<li ><a href='#' class='menu-dropdown'><i class='menu-icon fa "+icon+"'></i><span class='menu-text'>"+name+" </span> <i class='menu-expand'></i></a><ul class='submenu' id="+id+"></ul></li>";
   	     					$(".sidebar-menu").append(str);
   	     				}else {
   	     					var _pids = pids.split("-");
   	     					if(_pids.length == 1){
   	     						if(id == 18 || id == 19)
   	     							var nodeStr = " <li liid="+id+" style='background:#ccc'><a href='javascript:void(0);'  ><span class='menu-text'>"+name+"</span></a></li>";
   	     						else if(id == 17)
   	     							var nodeStr = " <li liid="+id+"><a href='javascript:void(0);' style='background:#ccc' onclick=aa('"+url+"') ><span class='menu-text'>"+name+"</span></a></li>";
   	     						else
   	     							var nodeStr = " <li liid="+id+"><a href='javascript:void(0);' onclick=aa('"+url+"') ><span class='menu-text'>"+name+"</span></a></li>";		
   	     						$("#"+pid+"").append(nodeStr);
   	     					}else{
   	     						var first_id = _pids[0];
	     						var sc_id = _pids[1];
     							var nodeStr = " <li liid="+id+"><a href='javascript:void(0);' onclick=aa('"+url+"') ><span class='menu-text'>"+name+"</span></a></li>";
     							if(!$("#"+sc_id).html()){
     								$("li[liid="+sc_id+"]").find("a").addClass("menu-dropdown").removeAttr("onclick").append("<i class='menu-expand'></i>");
     								$("li[liid="+sc_id+"]").append("<ul class='submenu' id="+sc_id+"></ul>");
     							}
     								$("#"+sc_id).append(nodeStr);
   	     					}
   	     				}
	        		}
				}
			});
		})
		function aa(val){
			var s = '${ctx}';
			$('.J_iframe').attr("src",s+"/"+val);
		}
		$(".account-area").find("li").click(function(){
	        $(this).toggleClass("open");
	    });
    </script>
    

</body>
<!--  /Body -->
</html>
